home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
tcxl551.zip
/
TCXL_INC.EXE
/
lha
/
INC
/
TCXLWIN.H
< prev
Wrap
Text File
|
1990-10-01
|
16KB
|
279 lines
/*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
| Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
|
| This Library is part of IDC's TesSeRact Development Tools product
| line. For information about other IDC products, call 1-215-884-3373.
*----------------------------------------------------------------------*
| <TCXLwin.h> : Public definitions and prototypes for TCXL windowing
| system.
*----------------------------------------------------------------------*
| PGS : $Id: tcxlwin.h 5.51 90/10/01 00:00:00 MLM Release Locker: MLM $
| $Log: tcxlwin.h $
| Revision 5.51 90/10/01 00:00:00 MLM
| TCXL 5.51
|
*======================================================================*/
#ifndef _TCXLwin_
# define _TCXLwin_ 1
# ifndef _TCXLvid_
# include <TCXLvid.h> /* video definitions */
# endif
# ifndef _TCXLerr_
# include <TCXLerr.h> /* error definitions */
# endif
/*- Box types ----------------------------*/
#define BOX_SNG 0x00 /* all single */
#define BOX_DBL 0x01 /* all double */
#define BOX_VER 0x02 /* horiz single, vert double */
#define BOX_HOR 0x03 /* horiz double, vert single */
#define BOX_HVY 0x04 /* heavy lines */
#define BOX_SPA 0x05 /* spaces */
/*- Border sides -------------------------*/
#define BRD_TOP 0x00 /* Top */
#define BRD_BOT 0x01 /* Bottom */
#define BRD_LFT 0x02 /* Left */
#define BRD_RGT 0x03 /* Right */
/*- Wcenter(), WpopUp centering flags ----*/
#define CNT_HOR 0x01 /* Horizontal */
#define CNT_VER 0x02 /* Vertical */
#define CNT_CNT 0x03 /* Both */
/*- Direction codes ----------------------*/
#define DIR_DWN 0x00 /* Down */
#define DIR_UP 0x01 /* Up */
#define DIR_LFT 0x02 /* Left */
#define DIR_RGT 0x03 /* Right */
/*- Wtitle() title positions -------------*/
#define TTL_LFT 0x01 /* Left */
#define TTL_CNT 0x02 /* Center */
#define TTL_RGT 0x03 /* Right */
/*------------------[ Data objects and access macros ]------------------*/
TYP struct Box BoxT, *BoxP;
TYP struct Ttl TtlT, *Ttlp;
TYP struct Wctl WctlT, *WctlP;
TYP struct Wdf WdfT, *WdfP;
struct Box /*-[ Window-frame object ]-------*/
{ BytT btyp; /* 00|00 : type */
BytT batr; /* 01|01 : attribute */
}; /* 02|02 ]-----------------------*/
#define BoxTyp(b) ((b).btyp)
#define BoxAtr(b) ((b).batr)
struct Ttl /*-[ Window-title object ]-------*/
{ ChrP tstr; /* 00|00 : string */
BytT tpos; /* 02|04 : position */
AtrT tatr; /* 03|05 : attribute */
}; /* 04|06 ]-----------------------*/
#define TtlStr(t) ((t).tstr)
#define TtlPos(t) ((t).tpos)
#define TtlAtr(t) ((t).tatr)
struct Wctl /*-[ Window-control object ]--------*/
{ WdfP wact; /* 00|00 : active window */
WdfP whid; /* 02|04 : top hidden window */
VOID (CTYP *wfun) /* 04|08 : fill-function */
(WrdT, WrdT, IntT, IntT);
WndT whdl; /* 06|0C : last handle assigned */
TagT whlp; /* 08|0E : current help category */
IntT wopn; /* 0A|10 : total open windows */
BytT wesc; /* 0C|12 : [Esc] checking ? 1 : 0 */
BytT wtab; /* 0D|13 : TTY output tab width */
BytT wfil; /* 0E|14 : fill character */
BytT wflg; /* 0F|15 : reserved flag byte */
}; /* 10|16 ]--------------------------*/
GBL WctlT CDC _WinCtl; /*- global window-control object ---------*/
#define WctlAct (_WinCtl.wact) /* active window */
#define WctlHid (_WinCtl.whid) /* top hidden window */
#define WctlFun (_WinCtl.wfun) /* fill function */
#define WctlHdl (_WinCtl.whdl) /* last handle */
#define WctlHlp (_WinCtl.whlp) /* help category */
#define WctlOpn (_WinCtl.wopn) /* total open */
#define WctlEsc (_WinCtl.wesc) /* [Esc] check */
#define WctlTab (_WinCtl.wtab) /* tab width */
#define WctlFil (_WinCtl.wfil) /* fill char */
#define WctlFlg (_WinCtl.wflg) /* flag byte */
struct Wdf /*-[ Window-definition object ]--*/
{ WdfP wprv; /* 00|00 : previous WdfT */
WdfP wnxt; /* 02|04 : next WdfT */
VcelP wbfr; /* 04|08 : buffer */
VcelP wsbf; /* 06|0C : shadow buffer */
TtlT wttl; /* 08|10 : title */
WndT whdl; /* 0C|14 : handle */
TagT whlp; /* 0E|16 : help category */
VposT wbeg; /* 10|18 : start position */
VposT wend; /* 12|1A : end position */
VposT wpos; /* 14|1C : cursor position */
BoxT wfrm; /* 16|1E : border */
AtrT wdat; /* 18|20 : default attribute */
AtrT wcat; /* 19|21 : current attribute */
AtrT wsat; /* 1A|22 : shadow attribute */
BytT wbrd; /* 1B|23 : border ? 1 : 0 */
}; /* 1C|24 ]-----------------------*/
#define WdfPrv(w) ((w)->wprv) /* previous WdfT */
#define WdfNxt(w) ((w)->wnxt) /* next WdfT */
#define WdfBfr(w) ((w)->wbfr) /* buffer */
#define WdfSbf(w) ((w)->wsbf) /* shadow buffer */
#define WdfTtl(w) ((w)->wttl) /* title */
#define WdfTtlS(w) (TtlStr(WdfTtl(w))) /* string */
#define WdfTtlP(w) (TtlPos(WdfTtl(w))) /* position */
#define WdfTtlA(w) (TtlAtr(WdfTtl(w))) /* attribute */
#define WdfHdl(w) ((w)->whdl) /* handle */
#define WdfHlp(w) ((w)->whlp) /* help category */
#define WdfBeg(w) ((w)->wbeg) /* start position */
#define WdfBegW(w) (VposW(WdfBeg(w))) /* word */
#define WdfBegC(w) (VposC(WdfBeg(w))) /* col */
#define WdfBegR(w) (VposR(WdfBeg(w))) /* row */
#define WdfEnd(w) ((w)->wend) /* end position */
#define WdfEndW(w) (VposW(WdfEnd(w))) /* word */
#define WdfEndC(w) (VposC(WdfEnd(w))) /* col */
#define WdfEndR(w) (VposR(WdfEnd(w))) /* row */
#define WdfPos(w) ((w)->wpos) /* cursor position */
#define WdfPosW(w) (VposW(WdfPos(w))) /* word */
#define WdfPosC(w) (VposC(WdfPos(w))) /* col */
#define WdfPosR(w) (VposR(WdfPos(w))) /* row */
#define WdfFrm(w) ((w)->wfrm) /* border */
#define WdfFrmT(w) (BoxTyp(WdfFrm(w))) /* type */
#define WdfFrmA(w) (BoxAtr(WdfFrm(w))) /* attribute */
#define WdfDat(w) ((w)->wdat) /* default attribute */
#define WdfCat(w) ((w)->wcat) /* current attribute */
#define WdfSat(w) ((w)->wsat) /* shadow attribute */
#define WdfBrd(w) ((w)->wbrd) /* b